package sysu.el.audit;

public class MaxInt {
	int ans;
	public MaxInt(int init){
		this.ans = init;
	}
	
	public void reset(){
		this.ans = Integer.MIN_VALUE;
	}
	
	public MaxInt(){
		this(Integer.MIN_VALUE);
	}
	
	public void sample(int sam){
		if (sam > this.ans)
			this.ans = sam;
	}

	public int getAns(int sam){
		if (sam < this.ans)
			this.ans = sam;
		return this.getAns();
	}
	
	public int getAns(){
		return this.ans;
	}
	
	public static MaxInt Ins = new MaxInt();
}
